#define _CRT_SECURE_NO_WARNINGS 1
class Solution {
public:
    bool areNumbersAscending(string s) {
        int last = 0;
        int cur = 0;
        for (int i = 0; i < s.size(); i++)
        {
            if (s[i] >= '0' && s[i] <= '9')
            {
                last = cur;
                cur = s[i] - '0';
                for (int j = i + 1; j < s.size(); j++)
                {
                    if (s[j] >= '0' && s[j] <= '9')
                    {
                        i++;
                        cur = cur * 10 + (s[j] - '0');
                    }
                    else
                        break;
                }
                if (cur <= last)
                {
                    //cout << "last: " << last << endl;
                    //cout << "cur: " << cur << endl;
                    return false;
                }
            }
        }
        return true;
    }
};